package com.sdry.service.impl.hpf;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sdry.mapper.hpf.MemberMapper;
import com.sdry.model.hpf.DepartmentMana;
import com.sdry.model.llm.User;
import com.sdry.service.hpf.MemberService;

/**
 * @ClassName: MemberServiceImpl 
 * @Description:基础信息Service实现
 * @Author hpf
 * @Date 2018年12月5日 上午11:25:28 
 * @version 1.0
 */
@Service
public class MemberServiceImpl implements MemberService {

	@Resource
	private MemberMapper memberMapper;
	
	/**
	 * 查询所有部门以及人员
	 * @return
	 */
	public List<DepartmentMana> listAllUser() {
		// TODO Auto-generated method stub
		List<DepartmentMana> dList = memberMapper.listAllDepartment();
		for (DepartmentMana department : dList) {
			List<User> userList = memberMapper.listAllUserByDid(department.getDid());
			department.setUserList(userList);
		}
		return dList;
	}

}
